package com.project.nimsen.weixin.bean;

import org.apache.commons.lang3.StringUtils;
import org.dom4j.Element;

/**
 * 接收的文本信息类
 * */
public class TextRMsg extends BaseRMsg {
	private String content;//文本的内容

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	protected String info() {
		StringBuffer info = new StringBuffer(super.info());
		info.append("<Content><![CDATA[").append(this.getContent()).append("]]></Content>");
		return info.toString();
	}

	protected void fullchildProperty(Element root) {
		super.fullchildProperty(root);
		String str_content = root.elementText("Content");
		if(StringUtils.isNotBlank(str_content))
			this.setContent(str_content);
	}
}
